package com.zhen.User;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private int code;
    private String msg;
    private Object data;
    public Result success(Object data) {
        return new Result(1,"success",data);
    }
    public Result success() {
        return new Result(1,"success",null);
    }
    public Result error() {
        return new Result(0,"error","null");
    }
}
